package com.qqt.csr.route.vo.req;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.qqt.csr.common.operalog.OperaLogSchema;
import com.qqt.csr.common.utils.JsonUtil;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.*;
import lombok.*;
import lombok.experimental.Accessors;
import org.springframework.data.mongodb.core.mapping.Field;
import org.springframework.data.mongodb.core.mapping.FieldType;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 客服路由业务规则
 */
@Getter
@Setter
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
@JsonIgnoreProperties(ignoreUnknown = true)
@Schema(name = "RouteBizRuleReqVO", description = "路由的业务规则")
public class RouteBizRuleReqVO implements Serializable {
    private static final long serialVersionUID = 1L;

    @Schema(description = "业务名称",requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "业务名称不能为空")
    @Size(max = 10, message = "业务名称最多10字符")
    private String name;

    /**
     * 服务时间id
     */
    @Schema(description = "服务时间id",requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "请设置服务时间")
    private Integer bizTimeId;

    /**
     * 非策略时间进线话术
     */
    @Schema(description = "非策略时间进线话术",requiredMode = Schema.RequiredMode.REQUIRED)
    @NotBlank(message = "非策略时间进线话术不能为空")
    @Size(max = 30, message = "非策略时间进线话术最多30字符")
    private String restTimeInTip;

    /**
     * 技能组id集合
     */
    @Schema(description = "技能组id集合",requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "请勾选技能组")
    @Size(min = 1,message = "至少勾选一个技能组")
    private List<String> skillSetIds;

    @Schema(description = "分发规则：0 随机分配；1 轮询分配；2 会话量少优先分配；3 会话时长低优先分配",requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "请选择分发规则")
    @Min(value = 0,message = "分发规则值错误")
    @Max(value = 3,message = "分发规则值错误")
    private Integer distributeType;

    /**
     * 是否熟客优先：0 否；1 是
     */
    @Schema(description = "是否熟客优先：0 否；1 是",requiredMode = Schema.RequiredMode.REQUIRED)
    @NotNull(message = "请确认是否熟客优先")
    @Min(value = 0,message = "是否熟客优先值错误")
    @Max(value = 1,message = "是否熟客优先值错误")
    private Integer acquaintanceFirst;

    /**
     * 多少天内熟客优先
     */
    @Schema(description = "多少天内熟客优先",requiredMode = Schema.RequiredMode.REQUIRED)
    @Min(value=1,message = "天数范围：1-72天")
    @Max(value=72,message = "天数范围：1-72天")
    private Integer acquaintanceFirstLimit;
}